# author: LiuShihao
# data: 2020/12/1 12:36 下午
# youknow: 各位老铁,我的这套代码曾经有人出价三个亿我没有卖,如今拿出来和大家分享,不求别的,只求大家免费的小红心帮忙点一点,这里谢过了。
# desc:
# src_file = open('3.png','rb')    # 读取二进制文件
# target_file = open('3_copy.png','wb')# 写入二进制文件
# # 边读边写
# target_file.write(src_file.read())
# print("复制结束")
# # 关闭
# src_file.close()
# target_file.close()
# 使用with语句完成图片文件的复制
with open('3.png','rb') as file:
    with open('4_copy.png','wb') as target_file:
        target_file.write(file.read())
        print("拷贝结束")